From: Julien Grall Date: Tue, 19 Nov 2013 17:55:45 +0000 (+0000) Subject: xen/arm: gic: don't use dom0 variable in gicv_setup X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5904 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=d77044ccf1fd8dd0adc87cf2c0d77ac26958a7e8;p=xen.git xen/arm: gic: don't use dom0 variable in gicv_setup The commit 99bf30a "xen: arm: define guest virtual platform in API headers" modifies gicv_setup to either use harcoded addresses for guest or hardware addresses for dom0. In the latter case, the variable dom0 is not yet initialized. dom0 receives assignment by the return of domain_create which calls gicv_setup. Use the ID to know whether the domain is dom0 or not. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 33c6b8d1ac..ab4910699f 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -827,7 +827,7 @@ int gicv_setup(struct domain *d) * Domain 0 gets the hardware address. * Guests get the virtual platform layout. */ - if ( d == dom0 ) + if ( d->domain_id == 0 ) { d->arch.vgic.dbase = gic.dbase; d->arch.vgic.cbase = gic.cbase;